import dts from 'vite-plugin-dts';
import {defineConfig} from 'vite';

export default defineConfig({
    build: {
        outDir: 'dist',
        minify: true,
        emptyOutDir: true,
        sourcemap: true,
        lib: {
            entry: 'lib/index.ts',
            name: 'kr',
            fileName: (format, name) => `${name}.${format}.js`
        },
        rollupOptions: {}
    },
    plugins: [
        dts({
            rollupTypes: true,
            tsconfigPath: './tsconfig.json'
        })
    ]
});
